home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12198 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.2 KB  |  42 lines

  1. Path: aimnet.aimnet.com!not-for-mail
  2. From: jmcneill@aimnet.com (Jonathan S. McNeill)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Questions about include files, and make file error
  5. Date: 29 Mar 1996 09:59:43 -0800
  6. Organization: Aimnet Corporation
  7. Sender: jmcneill@aimnet.com
  8. Message-ID: <4jh8ef$od8@aimnet.aimnet.com>
  9. References: <4jfqvn$gb6@sue.cc.uregina.ca>
  10. NNTP-Posting-Host: aimnet.aimnet.com
  11.  
  12. In article <4jfqvn$gb6@sue.cc.uregina.ca>,
  13. Shayne G. Wright <wright@HERCULES.CS.UREGINA.CA> wrote:
  14.  
  15. >        The first question is, can it be setup so that
  16. >    an #include <ncurses.h> statement, or similar, would
  17. >    cause the compiler to look in /usr/include/ncurses
  18. >    or any other subdirectory, or do I have to make use of
  19. >    symbolic links and/or move the *.h files to /usr/include/
  20.  
  21. Well, unless I misunderstand the question, there are a few ways to do this.
  22. If the include file directory is a subdirectory of /usr/include, say,
  23. /usr/include/sys, for example, just use
  24.  
  25. #include <sys/myheader.h>
  26.  
  27. You could also use:
  28.  
  29. #include "/usr/include/sys/myheader.h"
  30.  
  31. Another option would be to let the compiler find your header for you with:
  32.  
  33. #include "myheader.h"
  34.  
  35. and use the -I option of cc (or equivalent) to specify the search path
  36. for header files.
  37.  
  38. R/
  39. Jon McNeill
  40. jmcneill@aimnet.com
  41.  
  42.